<template>
<section class="index">

    <h1 class="index-title">{{Indexlist.title}}</h1>
    <div class="index-date">{{Indexlist.datetime}}</div>
    <div class="index-bgimg"><img :src=Indexlist.image alt=""></div>
    <div class="benediction">
      <div class="benediction-wrap" v-for="(item,index) in Indexlist.dianjishu" :key="index">
        <img :src=item.image alt="">
        <p class="incense">{{item.name}}</p>
        <h3 class="count">{{item.numbers}}</h3>
      </div>
    </div>
    <div class="makebenediction">
      <div class="makebenediction-wrap">
        <router-link v-bind="{to:'/send'}">制作您的祝福</router-link>
      </div>
    </div>
</section>
</template>

<script>
// import store from '../store/index.js'
export default {
  components:{

  },
  data(){
    return{
      msg:'hello vuex',
      Indexlist:{}
    }
  },
  methods:{
    indexlist(){
      this.$http.post('/home/buddhism/index').then(response =>{
        if(response.msg = "SUCCESS"){
          this.$store.commit('updateLoadingStatus', {isLoading: false})
          this.Indexlist  = response.data.data;
        } 
      })
    },
  },
  created(){
    this.indexlist()
  }
}
</script>

<style lang='less'>
.index{
  padding: 119px 30px 30px 30px;
  .index-title{
    color: #B38A43;
    font-size: 48px;
  }
  .index-date{
    color:#333;
    margin-bottom: 25px;
    font-size: 24px;
  }
  .index-bgimg{
    width: 100%;
    height: 561px;
    margin-bottom: 22px;
    img{
      width: 100%;
      height: 100%;
    }
  }
  .benediction{
    display: flex;
    justify-content: space-around;
    width:100%;
    height: 240px;
    margin-bottom: 30px;
    :nth-child(1){
      img{
        width:110px;
        height: 94px;
      }
    }
    :nth-child(2){
      img{
        width: 97px;
        height:66px;
        padding-top: 29px;
      }
    }
    :nth-child(3){
      img{
        width: 56px;
        height: 89px;
        padding-top: 2px;
      }
    }
    :nth-child(4){
      img{
        width: 61px;
        height: 69px;
        padding-top:20px;
      }
    }
    .benediction-wrap{
      height: 100px;
      text-align: center;
      .incense{
        font-size: 28px;
        color: #5e4f34;
      }
      .count{
        font-size: 32px;
        color:#A67D37;
      }
    }
  }
  .makebenediction{
    margin: 0px 170px;
    color: #fff;
    background-color: #CD9D33;
    border-radius: 50px;
    .makebenediction-wrap{
    font-size: 28px;
    height:90px;
    line-height:90px;
    text-align: center;
      a{
       text-decoration:none !important;
       display:block;
       color: inherit;
      }
    }
  }
}
div.popContainer{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: none;
}

</style>
